package day02.annotation.repository;

import day02.annotation.TestObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

/**
 * @author 夏焰波
 * @date 2020-08-21 2:09
 */

//@Repository("userRepository")//@Autowired 如果有多个类型相同的bean，则按照名称匹配
@Repository
public class UserRepositoryImpl implements UserRepository {
    @Autowired(required = false)
    private TestObject testObject;
    @Override
    public void save() {
        System.out.println("UserRepository save...");
        System.out.println(testObject);
    }
}
